/*
 * Copyright (c) 2006, 2023, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

import javax.swing.*;
import java.util.Scanner;

/**
 * <p>Project: jse2302 - InputOk
 * <p>Powered by webrx On 2023-06-12 09:16:41
 * <p>Created by IntelliJ IDEA
 *
 * @author  webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class InputOk {
    public static void main(String[] args) {
        //Scanner
        Scanner sc = new Scanner(System.in);
        int age = sc.nextInt();//int
        String name = sc.next(); //字符串
        double money = sc.nextDouble();//double
        System.out.println(age);
        System.out.println(name);
        System.out.println(money);

    }


    public static void input2(String[] args) {
        //对话框输入
        String age = JOptionPane.showInputDialog("请输入你的年龄",55);
        String name = JOptionPane.showInputDialog(null,"请输入姓名","CRM系统提示",JOptionPane.WARNING_MESSAGE);
        System.out.printf("你的年龄是：%s岁",age);
    }


    public static void input1(String[] args) {
        //程序参数输入 args  java InputOk.java 10 15
        String a = args[0];
        System.out.println(a);

        String b = args[1];
        System.out.println(b);

        System.out.println(a+b);

        //数据类型转换
        int sum = Integer.parseInt(a) + Integer.parseInt(b);
        System.out.printf("%s + %s = %d",a,b,sum);

    }
}
